<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>打印当前时间 比如：周四[11:15:8]</title>
</head>

<body>
  <script>
    var Date = new Date()
    var h = Date.getHours()
    var m = Date.getMinutes()
    var s = Date.getSeconds()
    var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']

    console.log(week[Date.getDay()] + h + ':' + m + ':' + s);
  </script>
</body>

</html>